#pragma once

namespace Be
{
	class Locker
	{
	public:
		Locker();
		~Locker();

		void WriteLock();
		void WriteUnlock();
		void ReadLock();
		void ReadUnlock();

	protected:
		volatile long m_Lock;
		volatile long m_ReadLock;
	};
}

namespace Be
{
	class LockWrite
	{
	public:
		LockWrite(Locker& p_rLocker);
		~LockWrite();

		LockWrite& operator=( const LockWrite& ) {}

	protected:
		Locker& m_rLocker;
	};
}

namespace Be
{
	class LockRead
	{
	public:
		LockRead(Locker& p_rLocker);
		~LockRead();

		LockRead& operator=( const LockRead& ) {}

	protected:
		Locker& m_rLocker;
	};
}